<template>
	<span class="label" :class="colorSwitch?'':'option-background'">
		<slot></slot><span v-if="!disableClose" @click="close">x</span>
	</span>
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator';
@Component({
  name: 'radioLabel'
})
export default class extends Vue {
  @Prop({ default: true }) private disableClose: any; // 是否禁用关闭
  @Prop({ default: 0 }) private colorSwitch: any;
  private close () {
    this.$emit('close');
  }
}
</script>
<style lang="stylus" scoped>
.label {
	font-size 14px
	line-height 20px
	border-radius 100px
	padding 2px 12px
	color #fff
	display inline-block
	&+.label {
		margin-left 8px
	}
}
.option-background {
	color #595959
	padding 0
}
</style>
